#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

#include "td_rbtree.h"

class QPixmap;

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QSize p_size_,QWidget *parent = nullptr);
    void draw();
    ~Widget();

public slots:
    void fucka();

private:
    Ui::Widget *ui;
    QPixmap * p{};
    TD_RBtree *t{};

    int r{16};
    QFont f{};
    int hspace=3*r;
    // QWidget interface
protected:
    virtual void paintEvent(QPaintEvent *event) override;
private slots:
    void on_clear_clicked();
    void on_insert_clicked();
    void on_delete_2_clicked();
    void on_lineEdit_editingFinished();
    void on_randm_insert_clicked();
};
#endif // WIDGET_H
